﻿using System;
using ProjScan.RecordManager;
using ProjScan.RecordManager.AssetData;
using ProjScan.ScanRule.Attr;
using UnityEngine;

namespace ProjScan.ScanRule.ProjectAssets.Prefab
{
	// Token: 0x020001CA RID: 458
	[LODGroupRuleAttr]
	internal class LODGroup_MissingRenderer : RecordRuleImp<LODAssetData, LODRecordManager>
	{
		// Token: 0x06000EA0 RID: 3744 RVA: 0x00042468 File Offset: 0x00040668
		protected override bool IsOK(LODAssetData assetData)
		{
			bool flag = assetData.lods == null || assetData.lodCount == 0;
			bool result;
			if (flag)
			{
				result = false;
			}
			else
			{
				LOD[] lods = assetData.lods;
				for (int i = 0; i < lods.Length; i++)
				{
					bool flag2 = lods[i].renderers.Length == 0;
					if (flag2)
					{
						assetData.missingLevels.Add(i);
					}
				}
				bool flag3 = assetData.missingLevels.Count > 0;
				result = !flag3;
			}
			return result;
		}
	}
}
